package com.yingxin.yxerp.module.organization.vo.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * 部门
 * @author fanchao
 * @since 2021-05-13
 */

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "DepartmentCreateVo对象", description = "部门")
public class DepartmentCreateVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @Length(max = 30)
    private String dno;

    @ApiModelProperty(value = "名称", required = true)
    @Length(max = 50)
    @NotBlank(message = "名称不能为空")
    private String name;

    @ApiModelProperty(value = "排序值")
    @Range(min = 0, max = 99999999)
    private String sort;

    @ApiModelProperty(value = "上级", required = true)
    // @NotBlank(message = "上级不能为空")
    private String parentId;

    private List<String> managerIds;

}
